from django.urls import path
from myadmin.views import *

urlpatterns = [

    # 首页
    path('', IndexViews.index, name='myadmin_index'),

    # 登入首页
    path('login', IndexViews.mylogin, name='myadmin_login'),
    # 登入验证
    path('relogin', IndexViews.relogin, name='myadmin_relogin'),
    # 验证码
    path('yzm', IndexViews.verifycode, name='myadmin_yzm'),

    # 会员管理
    path('user/index', UserViews.index, name='myadmin_user_index'),
    path('user/add', UserViews.adduser, name='myadmin_user_add'),
    path('user/edit', UserViews.edituser, name='myadmin_user_edit'),
    path('user/import', UserViews.importuser, name='myadmin_user_import'),
    path('user/update', UserViews.updateuser, name='myadmin_user_update'),
    path('user/del/<int:id>/', UserViews.deluser, name='myadmin_user_del'),

    # 图书分类首页
    path('type/index', TypeViews.index, name='myadmin_type_index'),
    path('type/add', TypeViews.addtype, name='myadmin_type_add'),
    path('type/edit', TypeViews.edittype, name='myadmin_type_edit'),
    path('type/del', TypeViews.deltype, name='myadmin_type_del'),

    # 图书信息首页
    path('book/index', BookViews.index, name='myadmin_book_index'),
    path('book/add', BookViews.addbook, name='myadmin_book_add'),
    path('book/edit', BookViews.editbook, name='myadmin_book_edit'),
    path('book/del', BookViews.delbook, name='myadmin_book_del'),
    path('book/insert', BookViews.insertbook, name='myadmin_book_insert'),

    # 订单首页
    path('order/index', OrderViews.index, name='myadmin_order_index'),
]
